<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- vim: set ts=2 sts=2 sw=2 et: -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru">
  <head>
    <base href="/"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content="Блог"/>
    <meta name='yandex-verification' content='488cc353f829f8cf' />
    <title>UnBlog</title>
    <!--link rel="stylesheet" type="text/css" href="media/css/base.css" media="screen,projection"/-->
    <link rel="stylesheet" type="text/css" href="/css/base.css" media="screen, projection"/>
    <!--link rel="stylesheet" type="text/css" href="/css/screen.css" media="screen, projection"/-->

    {% block head %}
    {% endblock %}
  </head>
  <body>
    <div id="header">
      <h1><a href="/"><span>UnBlog</a></span></h1>
      <ul id="menu">
        {% for one in main_menu %}
          <li>
              <a href="{{one.url}}" title="{{one.title}}" {% if one.right %}class="al_right"{% endif %}> {{one.name}} </a>
              {% if one.submenu %}
                <ul class="submenu">
                  {% for sub in one.submenu %}
                    <li><a href="{{sub.url}}" title="{{sub.title}}">{{sub.name}}</a></li>
                  {% endfor %}
                </ul>
              {% endif %}
          </li>
        {% endfor %}
      </ul>
      <div id="cinfo">
        {% if user %}
        <a href="{% url editprofile %}"><img src="{{user_profile.photo}}" class="avatar_small al_right"></a>
        {% endif %}


        <p>Вы: 
          {% if user %}
          <a href="{% url editprofile %}">
            {% if user_profile.photo %}{% endif %}
            {% if user.first_name %} {{ user.first_name }} {{user.last_name}} {% else %} {{user.username}} {% endif %}
          </a>
            <p><b><a href="{% url users_logout %}?next=%2F">Выйти?</a></b></p>
          {% else %}
            Гость</p>
            <p><b><a href="{% url login_variants %}">Войти</a></b></p>
          {% endif %}
        </p>

      </div>
    </div><!-- #header -->
    <div id="content">
        {% if messages %}
        <ul class="messages">
            {% for message in messages %}
            <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
            {% endfor %}
        </ul>
        {% endif %}
        {% if errors %}
        <ul class="errors">
            {% for error in errors %}
            <li{% if error.tags %} class="{{ error.tags }}"{% endif %}>{{ error }}</li>
            {% endfor %}
        </ul>
        {% endif %}
        {% block content %}
            <h1>{{ title }}</h1>
        {% endblock %}
    </div>
    <div id='sidebar'>
      {% block sidebar %}
      {% endblock %}      
    </div>
    {% include 'yametrics.html' %}
  </body>
</html>
